package com.tt.dao;

import java.io.IOException;
import java.util.HashMap;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.SqlSession;
import org.springframework.stereotype.Repository;

import com.tt.utils.GetResult;

@Repository
public class FriendChatListImpl implements FriendChatList {

	@Override
	public void createFriendTable(String tablename) {
		//String tablename = "table"+id;
		HashMap<String, String> hm = new HashMap<>();
		hm.put("tablename", tablename);
		SqlSession ss = null;
		try {
			ss = GetResult.getSqlSession();
			ss.update("com.tt.bean.FriendChatList.createFriendTable", hm);
			ss.commit();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} finally{
			ss.close();
		}
	}
}
